package com.core.website.service;

import com.core.website.entity.DutyTemplate;
import com.core.website.entity.DutyTemplateDetail;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface DutyService {
    int addTemplate(DutyTemplate dutyTemplate);
//    int deleteTemplate(List<String> ids);
    List<DutyTemplate> queryTemplateAll();
    DutyTemplate queryTemplateOne(String id);

    int addTemplateDetail(DutyTemplateDetail dutyTemplateDetail);
    int delTemplateDetail(List<String> ids);
    List<DutyTemplateDetail> queryDetailByTemplateId(String templateId);
    List<Map<String,Object>> queryDutyByDay(String day);
    DutyTemplate queryTemplateByDay(String day);
    int  addDuty(List<Map<String,Object>> param,String day,String templateId) throws ParseException;
    int  updateDuty(List<Map<String,Object>> param,String day,String templateId) throws ParseException;
    List<Map<String,Object>> queryFiveDuty();
    List<Map<String,Object>> queryMonthDuty(String month);

    /**
     * 查询某个月中的排班情况 按照排班账号查询
     * @param month
     * @return
     */
    List<Map<String,Object>> queryMonthDutyAndUserName(String month,String userName);

    /**
     * 更新排班时带排班人员信息
     * @param dutyList
     * @param day
     * @param templateId
     * @return
     */
    int updateDutyAndUserName(List<Map<String, Object>> dutyList, String day, String templateId) throws ParseException;
}
